from time import sleep

from appium.webdriver.common.mobileby import MobileBy
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.support.wait import WebDriverWait
from APPauto.test_APPauto_practice.test_enterprise_wechat_app.po_add_del_member.package.base import Base


class EditMemberPackage(Base):

    def save_member(self):
        pass

    def delete_member(self):
        """删除成员"""
        # 点击 删除成员
        self.driver.find_element(MobileBy.XPATH,"//*[@text='删除成员']").click()
        # 点击二次确认弹框中的‘确定’
        ele = (MobileBy.XPATH,"//*[@text='确定']")  # 代码写错了，写成了 "//*[@rtext='确定']"
        # WebDriverWait(self.driver,10).until(expected_conditions.element_to_be_clickable(ele))
        self.driver.find_element(*ele).click()

